language: csharp

env:
  global:
    - VERSION: 5.0.0.${TRAVIS_BUILD_NUMBER}
    - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
    - DOTNET_CLI_TELEMETRY_OPTOUT: true
    - TRAVIS: true

dist: bionic

solution: ManagedIrbis5.sln

mono: none

dotnet: 8.0

script:
  - echo ${VERSION}
  - dotnet restore                                                                            Source/ManagedIrbis5.sln
  - dotnet build --no-restore            --configuration Release -p:Version=${VERSION}        Source/ManagedIrbis5.sln
  - dotnet test  --no-restore --no-build --configuration Release                              Source/ManagedIrbis5.sln
  - dotnet run   --no-restore --no-build --configuration Release --project                    Source/Tests/PftTests/PftTests.csproj
  - dotnet run   --no-restore --no-build --configuration Release --project                    Source/Tests/BarsikTestRunner/BarsikTestRunner.csproj
  - dotnet pack  --no-restore --no-build --configuration Release -p:PackageVersion=${VERSION} Source/ManagedIrbis5.sln
